import request from '@/api/request'

/**
 * 获取所有的活动列表
 * @returns
 */
export function findAllRecommends() {
  return request({
    url: '/lejuAdmin/homeRecommend/findAllRecommends'
  })
}

/**
 * 添加限时活动
 * @param {*} data
 * @returns
 */
export function addRecommend(data) {
  return request({
    url: '/lejuAdmin/homeRecommend/addRecommend',
    method: 'post',
    data
  })
}

/**
 *
 * 删除限时活动
 * @param {*} recommendId
 * @returns
 */
export function delRecommend(recommendId) {
  return request({
    url: `/lejuAdmin/homeRecommend/delRecommend/${recommendId}`,
    method: 'delete'
  })
}
